Optimal. Leaf size=153 \[ \frac{\sqrt{a+b x+c x^2} \left (-8 a B c-2 A b c+3 b^2 B\right )}{c^2 \left (b^2-4 a c\right )}-\frac{2 x \left (x \left (-2 a B c-A b c+b^2 B\right )+a (b B-2 A c)\right )}{c \left (b^2-4 a c\right ) \sqrt{a+b x+c x^2}}-\frac{(3 b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 c^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.135354, antiderivative size = 153, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {818, 640, 621, 206} \[ \frac{\sqrt{a+b x+c x^2} \left (-8 a B c-2 A b c+3 b^2 B\right )}{c^2 \left (b^2-4 a c\right )}-\frac{2 x \left (x \left (-2 a B c-A b c+b^2 B\right )+a (b B-2 A c)\right )}{c \left (b^2-4 a c\right ) \sqrt{a+b x+c x^2}}-\frac{(3 b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 c^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 818
Rule 640
Rule 621
Rule 206
Rubi steps
\begin{align*} \int \frac{x^2 (A+B x)}{\left (a+b x+c x^2\right )^{3/2}} \, dx &=-\frac{2 x \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x\right )}{c \left (b^2-4 a c\right ) \sqrt{a+b x+c x^2}}+\frac{2 \int \frac{a (b B-2 A c)+\frac{1}{2} \left (3 b^2 B-2 A b c-8 a B c\right ) x}{\sqrt{a+b x+c x^2}} \, dx}{c \left (b^2-4 a c\right )}\\ &=-\frac{2 x \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x\right )}{c \left (b^2-4 a c\right ) \sqrt{a+b x+c x^2}}+\frac{\left (3 b^2 B-2 A b c-8 a B c\right ) \sqrt{a+b x+c x^2}}{c^2 \left (b^2-4 a c\right )}-\frac{(3 b B-2 A c) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{2 c^2}\\ &=-\frac{2 x \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x\right )}{c \left (b^2-4 a c\right ) \sqrt{a+b x+c x^2}}+\frac{\left (3 b^2 B-2 A b c-8 a B c\right ) \sqrt{a+b x+c x^2}}{c^2 \left (b^2-4 a c\right )}-\frac{(3 b B-2 A c) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c x}{\sqrt{a+b x+c x^2}}\right )}{c^2}\\ &=-\frac{2 x \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x\right )}{c \left (b^2-4 a c\right ) \sqrt{a+b x+c x^2}}+\frac{\left (3 b^2 B-2 A b c-8 a B c\right ) \sqrt{a+b x+c x^2}}{c^2 \left (b^2-4 a c\right )}-\frac{(3 b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 c^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.231456, size = 148, normalized size = 0.97 \[ \frac{\frac{2 \sqrt{c} \left (8 a^2 B c+a \left (2 b c (A+5 B x)+4 c^2 x (B x-A)-3 b^2 B\right )-b^2 x (-2 A c+3 b B+B c x)\right )}{\sqrt{a+x (b+c x)}}+\left (b^2-4 a c\right ) (3 b B-2 A c) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right )}{2 c^{5/2} \left (4 a c-b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.006, size = 382, normalized size = 2.5 \begin{align*}{\frac{{x}^{2}B}{c}{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}+{\frac{3\,bBx}{2\,{c}^{2}}{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}-{\frac{3\,{b}^{2}B}{4\,{c}^{3}}{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}-{\frac{3\,{b}^{3}Bx}{2\,{c}^{2} \left ( 4\,ac-{b}^{2} \right ) }{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}-{\frac{3\,{b}^{4}B}{4\,{c}^{3} \left ( 4\,ac-{b}^{2} \right ) }{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}-{\frac{3\,bB}{2}\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{5}{2}}}}+2\,{\frac{aB}{{c}^{2}\sqrt{c{x}^{2}+bx+a}}}+4\,{\frac{abBx}{c \left ( 4\,ac-{b}^{2} \right ) \sqrt{c{x}^{2}+bx+a}}}+2\,{\frac{Ba{b}^{2}}{{c}^{2} \left ( 4\,ac-{b}^{2} \right ) \sqrt{c{x}^{2}+bx+a}}}-{\frac{Ax}{c}{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}+{\frac{Ab}{2\,{c}^{2}}{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}+{\frac{A{b}^{2}x}{c \left ( 4\,ac-{b}^{2} \right ) }{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}+{\frac{A{b}^{3}}{2\,{c}^{2} \left ( 4\,ac-{b}^{2} \right ) }{\frac{1}{\sqrt{c{x}^{2}+bx+a}}}}+{A\ln \left ({ \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{3}{2}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 3.29071, size = 1324, normalized size = 8.65 \begin{align*} \left [-\frac{{\left (3 \, B a b^{3} + 8 \, A a^{2} c^{2} +{\left (3 \, B b^{3} c + 8 \, A a c^{3} - 2 \,{\left (6 \, B a b + A b^{2}\right )} c^{2}\right )} x^{2} - 2 \,{\left (6 \, B a^{2} b + A a b^{2}\right )} c +{\left (3 \, B b^{4} + 8 \, A a b c^{2} - 2 \,{\left (6 \, B a b^{2} + A b^{3}\right )} c\right )} x\right )} \sqrt{c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt{c x^{2} + b x + a}{\left (2 \, c x + b\right )} \sqrt{c} - 4 \, a c\right ) - 4 \,{\left (3 \, B a b^{2} c - 2 \,{\left (4 \, B a^{2} + A a b\right )} c^{2} +{\left (B b^{2} c^{2} - 4 \, B a c^{3}\right )} x^{2} +{\left (3 \, B b^{3} c + 4 \, A a c^{3} - 2 \,{\left (5 \, B a b + A b^{2}\right )} c^{2}\right )} x\right )} \sqrt{c x^{2} + b x + a}}{4 \,{\left (a b^{2} c^{3} - 4 \, a^{2} c^{4} +{\left (b^{2} c^{4} - 4 \, a c^{5}\right )} x^{2} +{\left (b^{3} c^{3} - 4 \, a b c^{4}\right )} x\right )}}, \frac{{\left (3 \, B a b^{3} + 8 \, A a^{2} c^{2} +{\left (3 \, B b^{3} c + 8 \, A a c^{3} - 2 \,{\left (6 \, B a b + A b^{2}\right )} c^{2}\right )} x^{2} - 2 \,{\left (6 \, B a^{2} b + A a b^{2}\right )} c +{\left (3 \, B b^{4} + 8 \, A a b c^{2} - 2 \,{\left (6 \, B a b^{2} + A b^{3}\right )} c\right )} x\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{c x^{2} + b x + a}{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \,{\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 2 \,{\left (3 \, B a b^{2} c - 2 \,{\left (4 \, B a^{2} + A a b\right )} c^{2} +{\left (B b^{2} c^{2} - 4 \, B a c^{3}\right )} x^{2} +{\left (3 \, B b^{3} c + 4 \, A a c^{3} - 2 \,{\left (5 \, B a b + A b^{2}\right )} c^{2}\right )} x\right )} \sqrt{c x^{2} + b x + a}}{2 \,{\left (a b^{2} c^{3} - 4 \, a^{2} c^{4} +{\left (b^{2} c^{4} - 4 \, a c^{5}\right )} x^{2} +{\left (b^{3} c^{3} - 4 \, a b c^{4}\right )} x\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \left (A + B x\right )}{\left (a + b x + c x^{2}\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27956, size = 239, normalized size = 1.56 \begin{align*} \frac{{\left (\frac{{\left (B b^{2} c - 4 \, B a c^{2}\right )} x}{b^{2} c^{2} - 4 \, a c^{3}} + \frac{3 \, B b^{3} - 10 \, B a b c - 2 \, A b^{2} c + 4 \, A a c^{2}}{b^{2} c^{2} - 4 \, a c^{3}}\right )} x + \frac{3 \, B a b^{2} - 8 \, B a^{2} c - 2 \, A a b c}{b^{2} c^{2} - 4 \, a c^{3}}}{\sqrt{c x^{2} + b x + a}} + \frac{{\left (3 \, B b - 2 \, A c\right )} \log \left ({\left | -2 \,{\left (\sqrt{c} x - \sqrt{c x^{2} + b x + a}\right )} \sqrt{c} - b \right |}\right )}{2 \, c^{\frac{5}{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]